//
//  SettingAboutViewController.m
//  HandyDialer
//
//	Developed by Team Synergy
//  Created by Jordan Tseng on 11/11/14.
//  Coders: Jacky Li and Jordan Tseng 
//  Graphic Designer: Derek Fong
//  Developers: Brad Lisson, Derek Fong, Jacky Li, Jeremy Gangoso, Jordan Tseng
//  Copyright HandyDialer 2011. All rights reserved.
//

#import "SettingAboutViewController.h"

@implementation SettingAboutViewController
@synthesize backgroundArea;
@synthesize aboutText;

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) 
    {
        // Custom initialization
    }
    return self;
}

- (void)didReceiveMemoryWarning
{
    // Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];
    
    // Release any cached data, images, etc that aren't in use.
}

#pragma mark - View lifecycle

/*
 // Implement loadView to create a view hierarchy programmatically, without using a nib.
 - (void)loadView
 {
 }
 */


 // Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
 - (void)viewDidLoad
 {
	 defaults = [NSUserDefaults standardUserDefaults];
	 themeColor = [defaults stringForKey:@"Theme"];
	 [backgroundArea setImage:[UIImage imageNamed: [themeColor stringByAppendingString:@"_about_default.png"]]];
     aboutText.text = @"Handy Dialer V3.0\n2011-11-28\n\nTeam Synergy:\n\tBrad Lisson\n\tDerek Fong\n\tJacky Li\n\tJeremy Gangoso\n\tJordan Tseng\n\nGoal:\n\tTo enhance accessibility for those with motor control impairments.\n\nWebsite: http://code.google.com/p/cmpt-275-group4";
     [super viewDidLoad];
 }


- (void)viewDidUnload
{
    [super viewDidUnload];
    // Release any retained subviews of the main view.
    // e.g. self.myOutlet = nil;
}

- (void)viewDidAppear:(BOOL)animated
{
	defaults = [NSUserDefaults standardUserDefaults];
	themeColor = [defaults stringForKey:@"Theme"];
    [backgroundArea setImage:[UIImage imageNamed: [themeColor stringByAppendingString:@"_about_default.png"]]];
}

/*
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    // Return YES for supported orientations
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}*/

- (IBAction)close:(id)sender
{
	[self dismissModalViewControllerAnimated:NO];
}

@end
